package com.xaicode.ctoroad.kafka;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.kafka.annotation.EnableKafka;

@SpringBootApplication
@EnableKafka
public class KafkaApplication {

    public static void main(String[] args) {
        SpringApplication.run(KafkaApplication.class, args);
    }

//    @RequestMapping("/send")
//    @ResponseBody
//    public static void send() {
//        new Timer().schedule(new TimerTask() {
//            long number = 1;
//
//            @Override
//            public void run() {
//                UUID uuid = UUID.randomUUID();
//                System.out.println("第" + number + "次生成UUID,生成的UUID为----->" + uuid.toString());
//                kafkaTemplatestatic.send(Topic, "第" + number + "次生成UUID,生成的UUID为----->" + uuid.toString());
//                log.info("kafka send message number : {}", number);
//                number++;
//            }
//        }, 1000, 5000);
//    }

}
